import sympy as sp

x = sp.symbols("x")
f = x**5 + 2 * x**4 - 5 * x**3 - 4 * x**2 + 3 * x + 1
for n in range(1, 6):
    f_diff = sp.diff(f, x)
    print(f"第{n}阶导结果为：{f_diff}")
    f = f_diff
